<template>
  <section>
    <div class="flex-row">
      <div class="flex-item-fixed mr10">
        <div class="preview-layer">
          <div class="preview-bg"></div>
          <div class="preview-phone">
            <div class="preview-content">
              <!--<div class="top-video">-->
                <!--<template>-->
                  <!--<image-cover :thumb.sync="currentContent.cover" width="361px" height="241px" size-type="contain"></image-cover>-->
                <!--</template>-->
              <!--</div>-->
              <div class="article-title">
                <h1 class="title">{{currentContent.title}}</h1>
              </div>
              <div class="activity-time">
                <span>开始时间:{{currentContent.startTime}}</span>
              </div>
              <div class="activity-time">
                <span>结束时间:{{currentContent.endTime}}</span>
              </div>
              <div class="article-content">
                <html-content :contentHtml="currentContent.content"></html-content>
              </div>
            </div>
          </div>
        </div>
      </div>

      <div class="flex-item-fixed preview-right">
        <!--<el-col class="pd5" v-if="currentContent.status===3||currentContent.status===2||currentContent.status===1">-->
          <!--<el-button type="primary"  plain @click="save(2)">提交审核</el-button>-->
        <!--</el-col>-->
        <!--<el-col class="pd5" v-if="currentContent.status===4" v-has="{class:'activity:pass'}">-->
          <!--<el-button type="success"  plain @click="save(4)">审核通过</el-button>-->
        <!--</el-col>-->
        <!--<el-col class="pd5" v-if="currentContent.status===4" v-has="{class:'activity:reject'}">-->
          <!--<el-button type="info"  plain @click="save(5)">驳回</el-button>-->
        <!--</el-col>-->
        <!--<el-col class="pd5" v-if="currentContent.status===3" v-has="{class:'activity:publish'}">-->
          <!--<el-button type="info" plain @click="save(3)" >发布</el-button>-->
        <!--</el-col>-->
        <!--<el-col class="pd5" v-if="currentContent.status===5" v-has="{class:'activity:down'}">-->
          <!--<el-button type="danger" plain @click="save(6)">下架</el-button>-->
        <!--</el-col>-->
        <!--<el-col class="pd5" v-if="currentContent.status===1" v-has="{class:'activity:up'}">-->
          <!--<el-button type="danger" plain @click="save(7)">上架</el-button>-->
        <!--</el-col>-->
      </div>
    </div>
  </section>
</template>

<script>
import { mapGetters } from "vuex";
import ImageCover from "@/components/image-cover";
import HtmlContent from "@/components/html-content";
export default {
  name: "pre-activity",
  props: {
    isClose: Boolean
  },
  created() {},
  mounted() {},
  computed: {
    ...mapGetters({
      currentContent: "currentContent"
    })
  },
  data() {
    return {};
  },
  methods: {
    back() {
      this.$emit("close");
    },
    save(status) {
      this.currentContent.opt = status;
      this.$store
        .dispatch("addOrUpdateContentS", this.currentContent)
        .then(ret => {
          this.$notify({
            title: "提交成功",
            type: "success"
          });
          this.back();
        });
    }
  },
  components: {
    ImageCover,
    HtmlContent
  }
};
</script>

<style scoped>
@import "../../../../src/styles/preview-style.css";
</style>
